import pandas as pd

from src.utils.config import logger


def load_scalping_document_id():
    """
    读取刷单订单号列表
    :return:
    """
    logger.info('loading laptop scalping document id...')
    scalping_document_id = []
    with open('anomaly_files/laptop/scalping_document_id.txt', 'r') as f:
        document_id = f.readline()
        while document_id:
            scalping_document_id.append(document_id.strip())
            document_id = f.readline()
        return scalping_document_id


def load_scalping_product_no():
    """
    读取刷单产品列表
    :return:
    """
    logger.info('loading laptop scalping product no...')
    scalping_product = pd.read_excel('anomaly_files/laptop/scalping_document_item_serial_number.xlsx')
    scalping_document_item_serial_number = scalping_product['product_serial_no']
    return scalping_document_item_serial_number.tolist()
